import '../model/base_response.dart';
import '../http/request_api.dart';
import 'base_api_service.dart';

class InviteService extends BaseApiService {
  /// 获取用户邀请信息
  Future<BaseResponse<Map<String, dynamic>>> getInviteInfo() async {
    return await post(
      RequestApi.GET_INVITE_INFO,
      fromJsonT: (data) => data as Map<String, dynamic>,
    );
  }
  
  /// 提交邀请码
  Future<BaseResponse<Map<String, dynamic>>> submitInviteCode(String inviteCode) async {
    return await post(
      RequestApi.SUBMIT_INVITE_CODE,
      data: {'invite_code': inviteCode},
      fromJsonT: (data) => data as Map<String, dynamic>,
    );
  }
}